package com.woniuxy.controller;

import com.woniuxy.entity.ResponseEntity;
import com.woniuxy.service.ExamService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：jojo
 * @Date：2022/3/16 11:28
 * @Description :TODO
 */
@RestController
@RequestMapping("/exam")
public class ExamController {
    @Autowired(required = false)
    ExamService examService;

    @ApiOperation(value = "查询所有的考试信息")
    @RequestMapping("/findAll/{id}")
    public ResponseEntity findAll(@PathVariable("id") int id){
        return examService.findAll(id);
    }

    @ApiOperation(value = "查询所有培训的状态，用于判断是否能考试")
    @RequestMapping("/findStatus/{id}")
    public ResponseEntity findStatus(@PathVariable("id") int id){
        return examService.findStatus(id);
    }
}
